# fledermaus rom format file

# all lines beginning with a hash are ignored

# this file contains information that tells fledermaus how to interpret the
# rom data. changing this file won't change the rom, only how it looks in
# fledermaus.

# this version is "formffl.txt", used to interpret the rom for ffl (Final
# Fantasy Legend) and modified roms based on it. fconfig.txt determines which
# of these format files will be used.

# it shouldn't be necessary to modify this file for most purposes.

####

# file size: expected size of rom.
# size is 0x20000 = 131072, comprising bytes at offsets 0x00000~0x1FFFF.
filesize = 131072

# global checksum byte file positions.
gcb1 = 0x0014E
gcb2 = 0x0014F

####

# labels.
# used by fledermaus to provide context for some data.
# edit to taste.

crtype0 = Aquatic
crtype1 = Ogrish
crtype2 = Draconic
crtype3 = Unholy
crtypen = Neutral
crtypem = Multiple

element0 = Fire
element1 = Ice
element2 = Elec
element3 = Poison
element4 = Stone
element5 = Para
element6 = Weapon
element7 = Quake
elementn = None
elementm = Multiple

status0 = Death
status1 = Stone
status2 = Curse
status3 = Blind
status4 = Poison
status5 = Conf
status6 = Para
status7 = Sleep
statusn = None
statusm = Multiple

race0 = Human
race1 = Mutant
race2 = Monster

# room descriptions file.
# use roomname.txt, or create your own version.
roomfile = roomname.txt

####

# font matrix: tells fledermaus how to display the game's character set.

# c = control character of some kind
# f = characters stored in four-colour format (heart, etc)
# 1 = dte set 1 (dual tile encoding)
# 2 = dte set 2
# n = normal text (characters stored in two-colour format; alphanum, symbols)
# b = border character (four-colour)
# d = character with dakuten superscript
# h = character with handakuten superscript

# no comments allowed within matrix.

fontmatrix = :
cccccccccccccccc
cccccccccccccccc
cccccccccccccccc
cccccccccccccccc
ffffffffffffffff
1111111111111111
1111111111111111
1111111111111111
nnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnn
2222222222222222
2222222222222222
22222222nnnnnnnn
nnnnnnnbbbbbbbbb

# whether dte or superscription are used.
usesdte = 1
usessuper = 0

# whether character and ability names and other text can be entered with the
# keyboard.
typenames = 1
keysfile = keysffl.txt

# character set positions.
heartbase = 0x40
dte1base = 0x50
normalbase = 0x80
dte2base = 0xC0
borderbase = 0xF7

# dte tile specification file positions.
dte1pos = 0x14E40
dte2pos = 0x14EA0

# vram tile info.
useshvt = 0
heartvbase = 0x70
crysvbase = 0x60

# other characters.
usedash = 0xF2
space = 0xFF
numbase = 0x80

####

# graphic file positions.
heartpos = 0x0BF00
textpos = 0x0F100
crystalpos = 0x0BE00
borderpos = 0x0F4B8
spicpos = 0x06000
lpicpos = 0x10000
maptilepos = 0x04000
titlepos = 0x0BA00
attackpos = 0x0F650

# title info.
# type 0 = ffl-like; 12*10 subtiles.
titletype = 0
ffltitle = 0x0FF88

# attack animation info.
seqaddrpos = 0x1FC00
seqsstart = 0x1FCAC
seqsend = 0x1FFFF
atkxypos = 0x1FC1E
scrdefaddr = 0x1FBA0
scrstart = 0x1FBBE
scrend = 0x1FBDF
tornado = 0x1FB60

# sound file positions.
musicaddr = 0x1C62F
musicstart = 0x1C69B
musicend = 0x1E86F
musicfirst = 0
musiclast = 17
sfxaddr = 0x1EBC7
sfxstart = 0x1EC57
sfxend = 0x1EDFF
sfxfirst = 1
sfxlast = 36

####

# text file positions.
ctAaddrpos = 0x019F3
ctBaddrpos = 0x01A46
ctCaddrpos = 0x01A40
cheststart = 0x01C11
chestend = 0x01C2F
ftextaddr = 0x0B860
ftextstart = 0x0B500
ftextend = 0x0B85F
ftextfirst = 0
ftextlast = 0x4F
mtextaddr = 0x0F080
mtextstart = 0x0EC00
mtextend = 0x0F07F
mtextfirst = 0
mtextlast = 0x32
ngridpos = 0x0F548
cnamepos = 0x14000
anamepos = 0x14640
stextaddr = 0x17B30
stextstart = 0x14EF0
stextend = 0x17B2F
stextfirst = 0x010
stextlast = 0x10E
statuspos = 0x17FC0

####

# room-related data file positions.
roomaddr = 0x098D0
roommax = 0xC7
roomstart = 0x09A60
roomend = 0x0A2EF
npcpics = 0x09240
piclistmax = 0x17
npc1start = 0x0985E
npc1end = 0x098CF
npc2start = 0x0A2F0
npc2end = 0x0AFA4
mapstart = 0x0C000
mapend = 0x0EBFF
exitspos = 0x092D0
exitmax = 0x1D9
gsetaddr = 0x08820
gsetstart = 0x08000
ssetstart = 0x08840
ssetmax = 0x27
enclistpos = 0x1A400
enclistmax = 0x8C
encdatapos = 0x1A868
encformpos = 0x1B2C4
encformmax = 0x1E

####

# data and misc file positions.
cdatapos = 0x1AAE8
charmax = 0xC7
adatapos = 0x1B700
abilmax = 0xFF
spidmlpos = 0x0B438
walktiles = 0x0200D
lpidpos = 0x0B900
lspecpos = 0x0B9C8
lflavpos = 0x00E16
meattable = 0x0AFD3
meatlists = 0x0B2A8
flavourmax = 0x1C
eatermax = 0x18
outcomemax = 0x18
smcurspecs = 0x03F12
crtypepos = 0x1B1F0
movesstart = 0x1B321
movesend = 0x1B6FF
hpvalues = 0x1B254
goldvalues = 0x1B2A4
silvvalues = 0x1B294
itemprices = 0x17E10
daidpos = 0x18E16
shopdata = 0x17D2E
shopfirst = 0x03
shoplast = 0x18
guilddata = 0x17F90
guildfirst = 0xF2
guildlast = 0xF7
mutatefreq = 0x1BF00
mutatevals = 0x1BF0A
mutateabil = 0x1BF0F
creahpvals = 0x1BF50
fightmusic = 0x1F4D7

####

# field-behaviour code file positions.
fcaddr1pos = 0x03739
fcaddr2pos = 0x03769
fca1base = 0x00
fca1max = 0x17
fca2base = 0x80
fca2max = 0x86
fcpotion = 0x03881
fccure = 0x038CF
fcremedy = 0x03929
fclife = 0x0394A
fcelixir = 0x03974
fcheart = 0x039BD
fcrenew = 0x03802
fcteleport = 0x03777
fcssource = 0x039D9
fcasource = 0x039E0
fchsource = 0x03A1B
fchero1 = 0x03A9E
fchero2 = 0x03AAA
fchero3 = 0x03AB6
fcairseed = 0x03B32
fcorb = 0x03A75
fceraser = 0x03B3D
fcfullcure = 0x039AA

####

# misc code file positions.
mcnewstext = 0x00864
mcnewguild = 0x0FE34
mccryssetf = 0x02842
mcfoursetf = 0x02890
mccryspent = 0x02810
mcfourreqf = 0x02838
mccrystest = 0x0282D
mcfourshow = 0x0287A
mccrysshow = 0x02AB1
mccrystext = 0x03B1E
mccryssfx = 0x02853
mcfoursfx = 0x02885
mcorbsetf1 = 0x03A8D
mcorbsetf2 = 0x03A94
mcking1set = 0x03A9E
mcking2set = 0x03AAA
mcking3set = 0x03AB6
mckingincf = 0x03B0C
mcherotest = 0x03B12
mcherofull = 0x03AFF
mcherosetf = 0x03B17
mcheroroom = 0x03AC3
mcherotile = 0x03ACB
mcairstext = 0x03B32
mcerasroom = 0x03B40
mcerastext = 0x03B45
mcarmradd1 = 0x0362C
mcarmradd2 = 0x03630
mcarmradd3 = 0x0360B
mcarmradd4 = 0x0360F
mcarmradd5 = 0x036A1
mchpupbase = 0x03A61
mcvehicpic = 0x0255D
mcattrcap = 0x03A18
mchpcap = 0x03A4E
mccapwrite = 0x001E3

mcsawfix1 = 0x18A04
mcsawfix2 = 0x189D5
mcsawfix2c = 0x18A29
mcsawfix3 = 0x189F0
mcsawfix3c = 0x180C6
mcsawfix3o = 0x180F8
mcexplfix1 = 0x18EBA
mcexplfix2 = 0x18EC3
mcconffix1 = 0x19998
mcconffix2 = 0x1999F
mcconffix3 = 0x199A4
mcstrblfix = 0x18553
mcsmdeffix = 0x18C0F
mcwmdeffix = 0x18E78
mcxclypfix = 0x18990
mcxclyfixo = 0x180EE
mcxclyfixc = 0x180F3
mcxclyfixa = 0x180E4
mcmhitefix = 0x18D51
mcebarrfix = 0x19917
mccoiltfix = 0x18AD2
mcshshdfix = 0x18DCC
mcdrnpcfix = 0x187CB
mcmuqrfix1 = 0x194CE
mcmuqrfix2 = 0x194DC
mcescrate = 0x19AC9
mccritrate = 0x18731
mcstlrate1 = 0x19D36
mcstlrate2 = 0x19D5F
mcsanerate = 0x18345
mcfailrate = 0x18C56
mcwidefail = 0x190D0
mcsthtwork = 0x18DE4
mcsthtdenm = 0x18DF9
mcmrrlimit = 0x19087
mcpoisabil = 0x19149
mcstlabil = 0x19D09
mcwrnabil1 = 0x19D1F
mcwrnabil2 = 0x19D29
mcwrnabil3 = 0x19D48
mcwrnabil4 = 0x19D52
mcparaabil = 0x184C6
mcslepabil = 0x184EE
mcforfabil = 0x19A68
mcesptext = 0x18E64
mcsanetext = 0x18352
mccreaenc = 0x1984C
mccrfround = 0x19DCE
mccrfaddr = 0x19DD4
mcfgttypes = 0x005F4

####
